<template>
    <div style="margin-left: 180px;padding-top: 15px;background-color: white;width: 1175px;">
        <div style="background-color: #006bb7;height: 50px;line-height:50px">
            <span style="color: white;font-size: 20px;margin-left: 20px;">游戏活跃度 排行</span>
        </div>
        <div style="width: 1175px; color: white;padding-bottom: 100px;">
            <el-table :header-cell-style="{background:'rgb(33, 13, 70)',color:'white'}" :data="gameList" stripe style="width: 100%">
                <el-table-column label="排名" width="50" type="index"></el-table-column>
                <el-table-column prop="name" label="名称" width="180" align="center"></el-table-column>
                <el-table-column prop="registerPerson" label="注册人数" width="180" align="center"></el-table-column>
                <el-table-column prop="company" label="公司" align="center"></el-table-column>
                <el-table-column prop="createTime" label="发布时间" align="center"></el-table-column>
            </el-table>
        </div>
    </div>
</template>

<script>
import gameApi from "@/api/game/game";
export default {
    data() {
        return {
            gameList: [],

        }
    },
    created() {
        this.fetchData()
    },
    methods: {
        fetchData(){
            gameApi.getGameListDesc()
            .then(response => {
                this.gameList = response.data
            })
        }
    },
}
</script>

<style>
#app{
    background: rgb(246, 246, 246);
    height: 100%;
    overflow: scroll;
  }
</style>